'''
Created on Jan 20, 2012

@author: xzhu
'''
possible_ioni = {'ASP':['-1', '0'], 'RSB':['+1', '0'], 'ARG':['+1', '0'], 'GLU':['-1', '0'], 'HOH':['0', 'M']}

class fu():
    def __init__(self, a = 1, b = 9):
        self.a = a
        self.b = b
        
    def __repr__(self):
        return repr((self.a, self.b))
    

        
def tr(lt):
    for i in lt:
        i.a = 100
    
from operator import attrgetter
        
z = []

p = fu(2, 3)
q = fu()
z.append(p)
z.append(q)

print z
newL = sorted(z, key=attrgetter('a'))
print newL



